{extend name='admin@main'}

{block name="button"}

<button data-modal="{:url('bannerForm')}" class='layui-btn layui-btn-sm layui-btn-primary'>添加</button>

{/block}

{block name='content'}
<div class="think-box-shadow">
    <table class="layui-table margin-top-10" lay-skin="line">
        {notempty name='list'}
        <thead>
        <tr>
            <th class='text-left nowrap'>id</th>
            <th class='text-left nowrap'>首页图</th>
            <th class='text-left nowrap'>操作</th>
        </tr>
        </thead>
        {/notempty}
        <tbody>
        {foreach $list as $key=>$vo}
        <tr>
            <td class='text-left nowrap'>
                {$vo.id}
            </td>
            <td class='text-left nowrap'>
                <img data-tips-image src="{$vo.url}" width="50px"/>
            </td>
            <td class='text-left nowrap'>
                <a class="layui-btn layui-btn-sm" data-modal='{:url("bannerForm")}?id={$vo.id}'>编 辑</a>
                <a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除该记录吗？"
                   data-action="{:url('bannerDelete')}?id={$vo.id}" data-value="id#{$vo.id}">删 除</a>
            </td>
        </tr>
        {/foreach}
        </tbody>
    </table>
    {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
</div>
{/block}

{block name="script"}
{/block}
